package com.by.zhdoctor.repository;

import com.by.zhdoctor.domain.Comment;
import com.by.zhdoctor.domain.Topic;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Spring Data JPA repository for the Comment entity.
 */
@SuppressWarnings("unused")
public interface CommentRepository extends JpaRepository<Comment,Long> {
    Page<Comment> findBytopic_id(Long id,Pageable pageable);
     List<Comment> findByTopic(Topic topic );
    void deleteByTopicId(Long id);
}
